import { createRouter, createWebHistory } from 'vue-router'
import ss_main from '@/views/ss-main.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'root',
      redirect: '/rumilife'// redirect to rumilife
    },
    {
      path: '/rumilife',
      name: 'rumilife',
      component: ss_main,
      children: [
        {
          path: '',
          name: 'home',
          component: () => import('@/components/common/ss-main/ss-home.vue')
        },
        {
          path: 'login',
          name: 'login',
          component: () => import('@/components/common/ss-main/ss-login.vue')
        },
        {
          path: 'register',
          name: 'register',
          component: () => import('@/components/common/ss-main/ss-register.vue')
        },
        {
          path: 'category',
          name: 'category',
          component: () => import('@/components/common/ss-main/ss-category.vue')
        }
      ]
    }
  ],
})

export default router
